package com.xujie.sportsmeeting.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * 角色数据传输对象
 */
@Data
public class RoleDTO {
    
    @NotBlank(message = "角色名称不能为空")
    @Size(min = 2, max = 50, message = "角色名称长度在2到50个字符")
    private String roleName;
    
    @NotBlank(message = "角色编码不能为空")
    @Pattern(regexp = "^[A-Z_]+$", message = "角色编码只能包含大写字母和下划线")
    @Size(min = 2, max = 50, message = "角色编码长度在2到50个字符")
    private String roleCode;
    
    @Size(max = 200, message = "角色描述长度不能超过200个字符")
    private String description;
    
    @NotNull(message = "状态不能为空")
    private Integer status;
}
